B-20947: SSW Actual Obligations 100% GCC Calculations #13705
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Agility ticket
INT PR
Merge after B-20946, as this has work built off of code on that branch
B-20946 INT PR
B-20948 INT PR
Summary
The SSW Actual Obligations 100% GCC Calculation was wrong because it was using the estimated weight. I changed the calculation to use the Actual Weight (that comes from the weight tickets) up to the maximum weight entitlement or allowable weight, whichever is lessor.
Actual Weight for a PPM is calculated by function getActualWeight that does all of the work. This unction adds up the total weight for the weight tickets and returns its value. functionPPMCloseoutFetcher.GetActualWeight(ppmShipment) at pkg/services/ppm_closeout/ppm_closeout.go line 227
You can also see the actual weight on the MTO tab as a counselor. "Actual PPM Weight"
Is there anything you would like reviewers to give additional scrutiny?
this article explains more about the approach used.
Verification Steps for the Author
These are to be checked by the author.
Verification Steps for Reviewers
These are to be checked by a reviewer.
Setup to Run the Code
How to test
If:
Entitlement = 5000
TotalWeight = 7500
Actual Weight = 4000
Then 100% GCC should equal 4000lbs
If:
Entitlement = 5000
TotalWeight = 7500
Actual Weight = 6000
Then 100% GCC should equal 5000lbs
You can add weight tickets as a customer by going to a customer with a PPM Shipment and following step 6:
Frontend
officeApp
class or custommin-width
styling is used to hide any states the would not be visible to the user.Backend
Database
Any new migrations/schema changes:
Screenshots